import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/styles/index.scss'
import SvgIcon from '@/icons'
import 'element-plus/dist/index.css'
import '@/router/permission'
import * as ELIcons from '@element-plus/icons-vue'
import i18n from '@/i18n'
import 'dayjs/locale/zh-cn'
import ElementPlus from 'element-plus'
import locale from 'element-plus/es/locale/lang/zh-cn'

// 分页组件
import Pagination from '@/components/Pagination'

const app = createApp(App)
for (const iconName in ELIcons) {
  app.component(iconName, ELIcons[iconName])
}
// 全局挂载组件
app.component('Pagination', Pagination)

SvgIcon(app)
app.use(router)
app.use(store)
app.use(i18n)
app.use(ElementPlus, {
  locale: locale
})
app.mount('#app')
// app.use(store).use(router).use(i18n).use(ElementPlus, { locale: zhCn }).mount('#app')
